/*
 * To change this license header, choose License Headers in Project Properties.
 * To change this template file, choose Tools | Templates
 * and open the template in the editor.
 */
package tools.cryptage;

import tools.cryptage.BCrypt;

/**
 *
 * @author Adrien
 */
public class FacadeBCrypt implements ICryptage{

    @Override
    public String cryptage(String password, String salt) {
        return BCrypt.hashpw(password,salt);
    }

    @Override
    public boolean valider(String motpasse, String salt,String hash) {
        return BCrypt.checkpw(motpasse, hash);
    }

    @Override
    public String gensalt() {
        return BCrypt.gensalt();
    }  
}
